export function param(a) {
    return Object.keys(a).map(function(k) {
        return encodeURIComponent(k) + '=' + encodeURIComponent(a[k])
    }).join('&');
}

export function buildUrl(url, query) {
    return url + (query ? "?" + param(query) : "");
}
